<template>
    <div class="flexbox flexcenter">
        <el-form-item style="margin-bottom:0">
            <el-checkbox v-model="createform.deep_external_action" :disabled="createform.delivery.cost_control || createform.delivery.smart_bid_type=='SMART_BID_CONSERVATIVE' ||  (createform.lab_ad_type=='LAB_AD' && dataForm.market=='VIDEO_PROM_GOODS')" true-label="AD_CONVERT_TYPE_LIVE_PAY_ROI" false-label="" @change="payRoi">支付ROI</el-checkbox>
        </el-form-item>
        <template v-if="createform.deep_external_action=='AD_CONVERT_TYPE_LIVE_PAY_ROI'">
            <el-form-item style="margin-bottom:0;margin-left:10px" prop="deep_bid_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
                <el-checkbox v-model="createform.deep_bid_type" true-label="MIN" disabled false-label="" @change="sessionSave">深度出价方式</el-checkbox>
            </el-form-item>
            <span class="font_14 color_01" style="margin-left:10px;margin-right:5px">支付ROI目标</span>
            <el-form-item style="margin-bottom:0" prop="roi_goal" :rules="createRules.checkRoi">
                <el-input placeholder="最多支持两位小数，0.01～100" style="width:215px" @change="sessionSave" v-model="createform.roi_goal" size="small">
                </el-input>
            </el-form-item>
            <span class="user_tips font_12 color_02">Tips：请自行确认账号是否拥有此功能</span>
        </template>
    </div>
</template>

<script>
export default {
    props:["createform","createRules","dataForm"],
    name: "",
    data() {
        return {};
    },
    created() {},
    methods: {
        sessionSave(){
            this.$emit("sessionSave")
        },

        // 选择支付ROI
        payRoi(v) {
            if (v == "AD_CONVERT_TYPE_LIVE_PAY_ROI") {
                this.createform.deep_bid_type = "MIN";
            }
            this.sessionSave();
        },
    },
    components: {},
};
</script>


<style scoped>
</style>

